<?php 
	$name = $_POST['email'];
	$password = $_POST['password'];

	$con = mysqli_connect('localhost','root','','cs2102');
	if(mysqli_connect_errno($con))
	{
		echo "";
	}
	else
	{
		$query = "select * from users where email = \"$name\"";
		
		$result =  mysqli_query($con, $query);
		$row = mysqli_fetch_array($result);

		$passwordStored = $row['password'];
		
		if(strcmp($password,$passwordStored)==0){
			
			echo $row['name'];
		}else{
			echo "";
		}
	}
	
	$mysqli_close = ($con);
?>
		